import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;


public class Lista 
{
	
	BufferedReader tst=new BufferedReader(new InputStreamReader(System.in));
	List<Produs> lista=new ArrayList<Produs>();
	public void addMarfa() throws IOException
	{
		System.out.println("Nume:");
		String nume=tst.readLine();
		System.out.println("Cod:");
		int cod=Integer.parseInt(tst.readLine());
		System.out.println("Pret:");
		int pret=Integer.parseInt(tst.readLine());
		System.out.println("Cantitate:");
		int cantitate=Integer.parseInt(tst.readLine());
		lista.add(new Produs(nume, cod, pret, cantitate));
	}
	public void stergeMarfa() throws NumberFormatException, IOException
	{
		System.out.println("Introduceti codul produsului pe care doriti sa il suprimati:");
		int cod_suprimat=Integer.parseInt(tst.readLine());
		ListIterator it=lista.listIterator();
	}
	public void showMarfa()
	{
		ListIterator it=lista.listIterator();
		while(it.hasNext())
			System.out.println(it.next());
	}
}
